package com.usian.controller;

import com.usian.pojo.TbItem;
import com.usian.pojo.TbItemCat;
import com.usian.service.ItemCategoryService;
import com.usian.utils.AdNode;
import com.usian.utils.ItemCatResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ItemCategoryController {

    @Autowired
    private ItemCategoryService itemCategoryService;

    @RequestMapping("selectItemCategoryByParentId")
    public List<TbItemCat> selectItemCategoryByParentId(Integer id){
        return itemCategoryService.selectItemCategoryByParentId(id);
    }

    @RequestMapping("/selectItemCategoryAll")
    ItemCatResult selectItemCategoryAll(){
        return itemCategoryService.selectItemCategoryAll();
    }



}
